In recent years, portable electronic devices (communication media) referred to as IC cards have remarkably spread. For example, the IC cards are used not only for the settlements of credit cards, commuter passes, passports, driver licenses and the other transactions but also in various fields as ID cards such as staff member cards, club member cards and insurance cards.
The IC card contains therein an integrated circuit (IC) chip including a nonvolatile data memory in which data can be written and rewritten and a control element such as a CPU. Moreover, an IC card processing apparatus such as an IC card reader/writer transmits a read command to the IC card and reads data from the IC card, and transmits a write command to the IC card and writes data in the IC card.
The IC card is configured to support command processing to cope with a large number of presumed functions. The IC card processing apparatus transmits a command to the IC card, and the IC card receives the command, and selects command processing by option selection in accordance with a parameter of the command.
The IC card is configured as described above. Therefore, when wrong designation is performed on the basis of the command, the IC card executes wrong command processing as designated sometimes. Moreover, since the IC card is configured as described above, the card supports even an unnecessary function in a specific application, and hence processing load of the specific application becomes heavy sometimes.